<template>
    <div class="sidebar">
        <el-col :span="24">
            <el-menu :default-active="onRoutes" class="el-menu-vertical-demo" theme="light" background-color="#009983" text-color="#fff" active-text-color="#ffd04b" unique-opened router>
                <el-menu-item index="Dashboard" style="color:white">
                    <span class="sb-icon">
                        <i class="icon iconfont icon-erweima"></i>
                    </span>
                    <span class="sb-cn">展示数据</span>
                </el-menu-item>
                <el-submenu index="1">
                    <template slot="title">
                        <span class="sb-icon">
                            <i class="icon iconfont icon-kefuyouxian"></i>
                        </span>
                        <span class="sb-cn"> 医生列表</span>
                    </template>
                    <el-menu-item index="doctorLog" class="sidebar_item">接诊记录</el-menu-item>
                    <el-menu-item index="editeDoctor" class="sidebar_item">医生编辑</el-menu-item>
                </el-submenu>
                <el-submenu index="2">
                    <template slot="title">
                        <span class="sb-icon">
                            <i class="icon iconfont icon-shengriliwu"></i>
                        </span>
                        <span class="sb-cn">行事职权</span>
                    </template>
                    <el-menu-item index="orderGrade" class="sidebar_item">分配排班</el-menu-item>
                </el-submenu>
                <el-submenu index="3">
                    <template slot="title">
                        <span class="sb-icon">
                            <i class="icon iconfont icon-liebiao"></i>
                        </span>
                        <span class="sb-cn">重置账号</span>
                    </template>
                    <el-menu-item index="assigAddresses" class="sidebar_item">分配账号</el-menu-item>
                </el-submenu>
            </el-menu>
        </el-col>
    </div>
</template>

<script>
export default {
  computed: {
    onRoutes() {
      return this.$route.path.replace("/", "");
    }
  }
};
</script>
<style lang="less" scoped>
.sidebar {
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  top: 66px;
  background: #009983;
  width: 200px;
  color: white;
  height: 100%;
  i {
    color: white;
  }
  ul {
    height: 100%;
  }
}
.el-menu-item,
.el-submenu__title {
  font-size: 14px;
}

.material-icons {
  font-size: 12px;
}
.sb-icon > i {
  font-size: 16px;
}
</style>
